#import <Foundation/Foundation.h>
#import "SynthesizeSingleton.h"
#import "JokeViewController.h"

@interface UserManager : NSObject
{
    JokeViewController *home;
}
SYNTHESIZE_SINGLETON_FOR_CLASS_HEADER(UserManager);

@property (assign, atomic) BOOL isLogin;
@property (copy, atomic) NSString *registerErrInfo;
@property (copy, atomic) NSString *email;
@property (copy, atomic) NSString *password;
@property (copy, atomic) NSString *sessionId;
@property (copy, atomic) NSString *userName;
@property (copy, atomic) NSString *userId;

-(NSString *)loginWithRecord:(JokeViewController *)phome;
-(NSString *)loginWithEmail:(NSString *)pEmail password:(NSString *)pPassword remember:(NSString *)pRemember;
-(BOOL)registerWithEmail:(NSString *)pEmail password:(NSString *)pPassWord username:(NSString *)pUserName;
-(void)logout;
-(void)loginWithOauth;

@end
